import multiprocessing
import time


def task(name):
    print(f'{name} is starting')
    time.sleep(2)
    print(f'{name} is end')


if __name__ == '__main__':
    p=multiprocessing.Process(target=task, args=('thread1',))
    p.daemon=True
    p.start()
    print('mainThread')
